import { API_ROOT,
    FILE_ROOT,
} from './config.js';

/** 
 *  登录相关接口
 * */
const comicLoginApi = {
    loginGetToken: '/login/getToken', // 登陆
    loginGenerateEmailCode: '/login/generateEmailCode', //获取验证码
    loginRegisterUser: '/login/registerUser', //注册 
    loginForgetPassword: '/login/forgetPassword', //忘记密码
};

/** 
 *  主页相关接口
 * */
const comicMainPageApi = {
    mainPageControllerQueryCoSpiderInfoList: '/mainPageController/queryCoSpiderInfoList', //获取py文件信息,不分页
    mainPageControllerQueryCoSpiderInfoById: '/mainPageController/queryCoSpiderInfoById', //根据id获取python文件信息
    mainPageControllerQueryHistoryRecordPage: '/mainPageController/queryHistoryRecordPage', //获取用户历史记录
    mainPageControllerCoCollectInfoPageByUser: '/mainPageController/coCollectInfoPageByUser', //获取用户收藏的漫画信息
    mainPageControllerQueryCollectComicPage: '/mainPageController/queryCollectComicPage', //获取本站推荐漫画
    mainPageControllerQueryRotationPicture: '/mainPageController/queryRotationPicture', //获取轮播图
    mainPageControllerQueryHomepageInfo: '/mainPageController/queryHomepageInfo', //获取今日最新漫画推荐
    mainPageControllerQueryDefaultSpiderInfo: '/mainPageController/queryDefaultSpiderInfo', //获取主页默认显示源
    mainPageControllerCoCollectInfoListByUser: '/mainPageController/coCollectInfoListByUser', //获取用户收藏漫画信息,不分页
    mainPageControllerQueryRotationPicturePage: '/mainPageController/queryRotationPicturePage', //获取轮播图,分页
}

/**
 * 执行py程序相关接口
 */
const comicShellApi = {
    shellControllerSearchComic: '/ShellController/searchComic', //搜索漫画
    shellControllerDetailComic: '/ShellController/detailComic', //获取漫画详情
    shellControllerPictureComic: '/ShellController/pictureComic', //获取阅读界面图片信息
}

/**
 * 用户操作
 */
const comicOperationApi = {
    operationControllerSaveCollectComic: '/operationController/saveCollectComic', //收藏漫画
    operationControllerCancelCollectComic: '/operationController/cancelCollectComic', //取消收藏漫画
    operationControllerSaveHistoryRecord: '/operationController/saveHistoryRecord', //增加阅读历史 
    operationControllerDeleteHistoryRecord: '/operationController/deleteHistoryRecord', //删除历史记录
    operationControllerAddAndEditRotationPicture: '/operationController/addAndEditRotationPicture', //新增修改轮播图
    operationControllerDeleteOtherPicture: '/operationController/deleteOtherPicture', //删除推荐漫画或轮播图
    operationControllerAddAndEditCollectComic: '/operationController/addAndEditCollectComic', //新增修改推荐漫画
    operationControllerDeleteCoSpiderInfo: '/operationController/deleteCoSpiderInfo', //删除python文件
}
/**
 * 文件上传下载
 */
const fileUploadApi = {
    minioControllerUpload: '/minioController/upload', //文件上传
}

/** 
 * 管理接口
 */
const comicManageApi = {
    userGetData: '/user/getData', //获取用户详细信息
    userSaveOrUpdate: '/user/saveOrUpdate', //修改用户信息
    userFindListPage: '/user/findListPage', //获取用户列表
    userDeleteByIds: '/user/deleteByIds', //删除用户
    pyControllerQueryCollectComicPage: '/pyController/queryCollectComicPage', //获取用户上传的py文件
    pyControllerAddAndEditSpiderInfoByUser: '/pyController/addAndEditSpiderInfoByUser', //新增修改python文件(用户)
    pyControllerQueryPyFileAll: '/pyController/queryPyFileAll', //获取所有py文件(审核)
    pyControllerApplyUserUploadPyFile: '/pyController/applyUserUploadPyFile', //审核漫画
}

export const APIROOT = API_ROOT;
export const FILEROOT = FILE_ROOT;
export const LoginGetTokenResource = API_ROOT.concat(comicLoginApi.loginGetToken);
export const LoginGenerateEmailCodeResource = API_ROOT.concat(comicLoginApi.loginGenerateEmailCode);
export const LoginRegisterUserResource = API_ROOT.concat(comicLoginApi.loginRegisterUser);
export const LoginForgetPasswordResource = API_ROOT.concat(comicLoginApi.loginForgetPassword);
export const MainPageControllerQueryCoSpiderInfoListResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryCoSpiderInfoList);
export const ShellControllerSearchComicResource = API_ROOT.concat(comicShellApi.shellControllerSearchComic);
export const MainPageControllerQueryCoSpiderInfoByIdResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryCoSpiderInfoById);
export const MainPageControllerQueryHistoryRecordPageResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryHistoryRecordPage);
export const MainPageControllerCoCollectInfoPageByUserResource = API_ROOT.concat(comicMainPageApi.mainPageControllerCoCollectInfoPageByUser);
export const ShellControllerDetailComicResource = API_ROOT.concat(comicShellApi.shellControllerDetailComic);
export const OperationControllerSaveCollectComicResource = API_ROOT.concat(comicOperationApi.operationControllerSaveCollectComic);
export const MainPageControllerQueryCollectComicPageResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryCollectComicPage);
export const ShellControllerPictureComicPageResource = API_ROOT.concat(comicShellApi.shellControllerPictureComic);
export const MainPageControllerQueryRotationPictureResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryRotationPicture);
export const MainPageControllerQueryHomepageInfoResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryHomepageInfo);
export const MainPageControllerQueryDefaultSpiderInfoResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryDefaultSpiderInfo);
export const UserGetDataResource = API_ROOT.concat(comicManageApi.userGetData);
export const UserSaveOrUpdateResource = API_ROOT.concat(comicManageApi.userSaveOrUpdate);
export const MinioControllerUploadResource = API_ROOT.concat(fileUploadApi.minioControllerUpload);
export const MainPageControllerCoCollectInfoListByUserResource = API_ROOT.concat(comicMainPageApi.mainPageControllerCoCollectInfoListByUser);
export const OperationControllerCancelCollectComicResource = API_ROOT.concat(comicOperationApi.operationControllerCancelCollectComic);
export const OperationControllerSaveHistoryRecordResource = API_ROOT.concat(comicOperationApi.operationControllerSaveHistoryRecord);
export const OperationControllerDeleteHistoryRecordResource = API_ROOT.concat(comicOperationApi.operationControllerDeleteHistoryRecord);
export const UserFindListPageResource = API_ROOT.concat(comicManageApi.userFindListPage);
export const UserDeleteByIdsResource = API_ROOT.concat(comicManageApi.userDeleteByIds);
export const MainPageControllerQueryRotationPicturePageResource = API_ROOT.concat(comicMainPageApi.mainPageControllerQueryRotationPicturePage);
export const OperationControllerAddAndEditRotationPictureResource = API_ROOT.concat(comicOperationApi.operationControllerAddAndEditRotationPicture);
export const OperationControllerDeleteOtherPicturePictureResource = API_ROOT.concat(comicOperationApi.operationControllerDeleteOtherPicture);
export const OperationControllerAddAndEditCollectComicResource = API_ROOT.concat(comicOperationApi.operationControllerAddAndEditCollectComic);
export const PyControllerQueryCollectComicPageResource = API_ROOT.concat(comicManageApi.pyControllerQueryCollectComicPage);
export const PyControllerAddAndEditSpiderInfoByUserResource = API_ROOT.concat(comicManageApi.pyControllerAddAndEditSpiderInfoByUser);
export const OperationControllerDeleteCoSpiderInfoResource = API_ROOT.concat(comicOperationApi.operationControllerDeleteCoSpiderInfo);
export const PyControllerQueryPyFileAllResource = API_ROOT.concat(comicManageApi.pyControllerQueryPyFileAll);
export const PyControllerApplyUserUploadPyFileResource = API_ROOT.concat(comicManageApi.pyControllerApplyUserUploadPyFile);


